//
//  UIView+Rect.m
//  Car4S
//
//  Created by mini on 13-4-15.
//
//

#import "UIView+Rect.h"
@implementation UIView(Rect)
- (void)setFrameX:(CGFloat)x{
    self.frame = CGRectMake(x, self.frame.origin.y, self.frame.size.width, self.frame.size.height);
}
- (void)setFrameY:(CGFloat)y{
    self.frame = CGRectMake(self.frame.origin.x, y, self.frame.size.width, self.frame.size.height);
}
- (void)setFrameOrigin:(CGPoint)point{
    self.frame = CGRectMake(point.x, point.y, self.frame.size.width, self.frame.size.height);
}
- (void)setFrameWidth:(CGFloat)width{
    self.frame = CGRectMake(self.frame.origin.x, self.frame.origin.y, width, self.frame.size.height);
}
- (void)setFrameHeight:(CGFloat)height{
    self.frame = CGRectMake(self.frame.origin.x, self.frame.origin.y, self.frame.size.width,height);
}
- (void)setFrameSize:(CGSize)size{
    self.frame = CGRectMake(self.frame.origin.x, self.frame.origin.y, size.width, size.height);
}
- (CGFloat)endPointX{
    return self.frame.size.width + self.frame.origin.x;
}
- (CGFloat)endPointY{
    return self.frame.size.height + self.frame.origin.y;
}
- (CGPoint)endPoint{
    return CGPointMake(self.frame.size.width + self.frame.origin.x, self.frame.size.height + self.frame.origin.y);
}
@end
